package ee.ttu.karileet.serviceshop.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import ee.ttu.karileet.serviceshop.dao.SubjectTypeDAO;
import ee.ttu.karileet.serviceshop.model.SubjectType;
import ee.ttu.karileet.serviceshop.service.SubjectTypeService;


@Service("subjectTypeService")
public class SubjectTypeServiceImpl implements SubjectTypeService {

	@Autowired
	private SubjectTypeDAO subjectTypeDao;
	
	@Override
	@Transactional
	public void insertSubjectType(SubjectType object) {
		subjectTypeDao.insertSubjectType(object);
	}

	@Override
	@Transactional
	public List<SubjectType> getSubjectTypes() {
		return subjectTypeDao.getSubjectTypes();
	}

	@Override
	@Transactional
	public SubjectType getSubjectTypeById(long id) {
		return subjectTypeDao.getSubjectTypeById(id);
	}

}
